package com.ruiysoft.controller.anchor;

public enum AnchorEnum {
    SHOP(1, "店铺"), MDSE(2, "商品"),SHOPCART(3,"购物车"),ORDER(4,"下单"),;

    private int index;
    private String name;

    private AnchorEnum(int index, String name) {
        this.index = index;
        this.name = name;
    }

    public static String getName(int index) {
        for (AnchorEnum s : AnchorEnum.values()) {
            if (s.getIndex() == index) {
                return s.getName();
            }
        }
        return null;
    }

    public int getIndex() {
        return this.index;
    }

    public String getName() {
        return this.name;
    }
}
